Loans API
Loan Maintenance Simulation
Description: This is a generic endpoint created for performing HR Loan Maintenance Simulation operations.
This endpoint has ability to perform 4 following operations namely :
- Simulation Loan Schedule Amendment
- Simulation Change Penalty Interest
- Simulation Change Principal Interest
- Simulation Loan Payment Deferment
Channel sends the request to mulesoft with the path parameter "arrangmentId". Mulesoft will send the request to t24 and get back the result.
A response is sent back to the channel immediately. If transaction fails due to any reason, a proper error is sent back to the API consuming channel to both REST using the error codes defined.
Mulesoft Request:
Headers:
Mandatory Headers: x-channel-id,x-correlation-id, x-bank-id,client_id, Authorization
Optional Headers: x-sub-channel-id,x-user-id, client_secret,x-debug-flag,x-debug-flag, x-customer-id
Paramaters:
URI Params: arrangmentId
Query Params: NA
Content-type: application/json
Mulesoft Request:
JSON Request for : Simulation - Change Penalty Interest
{
"activityName" : "LENDING-CHANGE-PENALTYINT",
"property" : "PENALTYINT",
"simulationFields" : [
{
"fieldName" : "MARGIN.TYPE",
"fieldValue" : "SINGLE"
},
{
"fieldName" : "MARGIN.OPER",
"fieldValue" : "ADD"
},
{
"fieldName" : "MARGIN.RATE",
"fieldValue" : "3.25"
}
]
}
JSON Request for : Simulation - Change Principal Interest
```
{
"activityName" : "LENDING-CHANGE-PRINCIPALINT",
"property" : "PRINCIPALINT",
"simulationFields" : [
{
"fieldName": "MARGIN.TYPE",
"fieldValue": "SINGLE"
},
{
"fieldName": "MARGIN.OPER",
"fieldValue": "ADD"
},
{
"fieldName": "MARGIN.RATE",
"fieldValue": "3.25"
},
{
"fieldName": "FLOATING.INDEX",
"fieldValue": "NULL"
},
{
"fieldName": "FIXED.RATE",
"fieldValue": "3"
}
]
}
**JSON Request for : Simulation - Loan Payment Deferment**
{
"activityName" : "LENDING-DEFINE.HOLIDAY-REPAYMENT.SCHEDULE",
"property" : "REPAYMENT.SCHEDULE",
"simulationFields" : [
{
"fieldName": "HOL.PAYMENT.TYPE",
"fieldValue": "INTEREST"
},
{
"fieldName": "HOL.START.DATE",
"fieldValue": "20210208"
},
{
"fieldName": "HOL.NUM.PAYMENTS",
"fieldValue": "1"
}
]
}
**JSON Request for : Simulation - Loan Schedule amendment**
{
"activityName": "LENDING-CHANGE-REPAYMENT.SCHEDULE",
"property": "REPAYMENT.SCHEDULE",
"simulationFields": [
{
"fieldName": "PAYMENT.TYPE:1:1",
"fieldValue": "DISBURSEMENT.%"
},
{
"fieldName": "PAYMENT.METHOD:1:1",
"fieldValue": "PAY"
},
{
"fieldName": "PROPERTY:1:1",
"fieldValue": "ACCOUNT"
},
{
"fieldName": "START.DATE:1:1",
"fieldValue": "R'\_'START"
},
{
"fieldName": "BILL.TYPE:1:1",
"fieldValue": "DISBURSEMENT"
},
{
"fieldName": "PAYMENT.TYPE:2:1",
"fieldValue": "INTEREST"
},
{
"fieldName": "PAYMENT.METHOD:2:1",
"fieldValue": "DUE"
},
{
"fieldName": "PAYMENT.FREQ:2:1",
"fieldValue": "e0Y e1M e0W o15D e0F"
},
{
"fieldName": "PROPERTY:2:1",
"fieldValue": "PRINCIPALINT"
},
{
"fieldName": "BILL.TYPE:2:1",
"fieldValue": "INSTALLMENT"
},
{
"fieldName": "PAYMENT.TYPE:3:1",
"fieldValue": "LINEAR"
},
{
"fieldName": "PAYMENT.METHOD:3:1",
"fieldValue": "DUE"
},
{
"fieldName": "PAYMENT.FREQ:3:1",
"fieldValue": "e0Y e1M e0W o11D e0F"
},
{
"fieldName": "PROPERTY:3:1",
"fieldValue": "ACCOUNT"
},
{
"fieldName": "START.DATE:3:1",
"fieldValue": "20201211"
},
{
"fieldName": "END.DATE:3:1",
"fieldValue": "20221111"
},
{
"fieldName": "BILL.TYPE:3:1",
"fieldValue": "INSTALLMENT"
}
]
}
### Mulesoft Response:
**Success Response: (200)**
{
"status": {
"success": true,
"code": "201",
"arabicMessage": "تمت العملية بنجاØ",
"englishMessage": "The Operation has been Successfully Completed"
},
"response": {
"transactionReferenceNo": "AASIM2103972D87S5V"
}
}
**Sample Error Response:**
**400** :
{
"status":
{
"success": false,
"code": "400",
"reasonCode": "BadRequest",
"arabicMessage": "لم يتم العثور على سجلات تطابق Ù…Øددات البØØ«",
"englishMessage": "No records were found that matched the selection criteria",
"backendError": "No records were found that matched the selection criteria",
"backendCode": "T24003790"
}
}